import { defHttp } from '/@/utils/http/axios';

enum Api {
  loginfo = '/sys/loginfo',
  visitInfo = '/sys/visitInfo',
  ab ='/sys/index/statistics',
  getUserData ='/sys/user/login/setting/getUserData',
  getindexDepTreeSync ='/sys/sysDepart/indexDepTreeSync',
  getHomerData='/sys/index/statistics'
}
/**
 * 日志统计信息/jeecg-boot/sys/sysDepart/indexDepTreeSync
 * @param params
 */
export const getLoginfo = (params) => defHttp.get({ url: Api.loginfo, params }, { isTransformResponse: false });
/**
 * 访问量信息
 * @param params
 */
export const getVisitInfo = (params) => defHttp.get({ url: Api.visitInfo, params }, { isTransformResponse: false });

/**
 * 首页数据
 * @param params
 */
export const statistics = () => defHttp.get({ url: Api.ab}, { isTransformResponse: false });
/**
 * 下拉数据
 * @param params
 */
export const indexDepTreeSync = (params) => defHttp.get({ url: Api.getindexDepTreeSync,params});

/**
 * 具体数据
 * @param params
 */
export const statisticsbyid = (params) => defHttp.get({ url: Api.ab, params }, { isTransformResponse: false });


// 首页下拉选择
/**
 * 获取用户信息
 * @param params
 */
export const getUserData = () => {
  return defHttp.get({ url: Api.getUserData },{ isTransformResponse:false });
}
// 首页下拉选择数据
/**
 * 获取用户信息
 * @param params
 */
export const getHomerData = (params) => {
  return defHttp.get({ url: Api.getHomerData,params });
}
